home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 2003 May (DVD) / Macworld Resource DVD May 2003.toast / Data / Software / Bonus / Database / mysql-max-3.23.55.sit / mysql-max-3.23.55-apple-darwi.1 / mysql-test / t / explain.test < prev    next >
Encoding:
Text File  |  2003-01-21  |  674 b   |  20 lines  |  [TEXT/ttxt]

  1. #
  2. # Test of different EXPLAIN's
  3.  
  4. drop table if exists t1;
  5. create table t1 (id int not null, str char(10), unique(str));
  6. insert into t1 values (1, null),(2, null),(3, "foo"),(4, "bar");
  7. select * from t1 where str is null;
  8. select * from t1 where str="foo";
  9. explain select * from t1 where str is null;
  10. explain select * from t1 where str="foo";
  11. explain select * from t1 ignore key (str) where str="foo";
  12. explain select * from t1 use key (str,str) where str="foo";
  13.  
  14. #The following should give errors
  15. !$1072 explain select * from t1 use key (str,str,foo) where str="foo";
  16. !$1072 explain select * from t1 ignore key (str,str,foo) where str="foo";
  17. drop table t1;
  18.  
  19. explain select 1;
  20.